package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.AVipTransXcxVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AVipTransMapper;
import com.ruoyi.system.domain.AVipTrans;
import com.ruoyi.system.service.IAVipTransService;

/**
 * 转让vipService业务层处理
 *
 * @author gf
 * @date 2024-11-26
 */
@Service
public class AVipTransServiceImpl implements IAVipTransService {
    @Autowired
    private AVipTransMapper aVipTransMapper;

    /**
     * 查询转让vip
     *
     * @param id 转让vip主键
     * @return 转让vip
     */
    @Override
    public AVipTrans selectAVipTransById(Long id) {
        return aVipTransMapper.selectAVipTransById(id);
    }

    /**
     * 查询转让vip列表
     *
     * @param aVipTrans 转让vip
     * @return 转让vip
     */
    @Override
    public List<AVipTrans> selectAVipTransList(AVipTrans aVipTrans) {
        return aVipTransMapper.selectAVipTransList(aVipTrans);
    }

    /**
     * 新增转让vip
     *
     * @param aVipTrans 转让vip
     * @return 结果
     */
    @Override
    public int insertAVipTrans(AVipTrans aVipTrans) {
        aVipTrans.setCreateTime(DateUtils.getNowDate());
        return aVipTransMapper.insertAVipTrans(aVipTrans);
    }

    /**
     * 修改转让vip
     *
     * @param aVipTrans 转让vip
     * @return 结果
     */
    @Override
    public int updateAVipTrans(AVipTrans aVipTrans) {
        aVipTrans.setUpdateTime(DateUtils.getNowDate());
    return aVipTransMapper.updateAVipTrans(aVipTrans);
    }

    /**
     * 批量删除转让vip
     *
     * @param ids 需要删除的转让vip主键
     * @return 结果
     */
    @Override
    public int deleteAVipTransByIds(Long[] ids) {
        return aVipTransMapper.deleteAVipTransByIds(ids);
    }

    /**
     * 删除转让vip信息
     *
     * @param id 转让vip主键
     * @return 结果
     */
    @Override
    public int deleteAVipTransById(Long id) {
        return aVipTransMapper.deleteAVipTransById(id);
    }

    /**
     * 批量逻辑删除转让vip
     *
     * @param ids 需要删除的转让vip主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipTransByIds(Long[] ids) {
        return aVipTransMapper.logicDeleteAVipTransByIds(ids);
    }
    /**
     * 逻辑删除转让vip信息
     *
     * @param id 转让vip主键
     * @return 结果
     */
    @Override
    public int logicDeleteAVipTransById(Long id) {
        return aVipTransMapper.logicDeleteAVipTransById(id);
    }

    @Override
    public List<AVipTransXcxVO> selectAVipTransXcxList() {
        return aVipTransMapper.selectAVipTransXcxList();
    }

}
